package com.itboye.zhujia.me.key;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import android.widget.ImageView;
import android.widget.TextView;

import com.itboye.zhujia.R;
import com.itboye.zhujia.adapter.key.ItemUnlockingAdapter;
import com.itboye.zhujia.base.BaseActivity;
import com.itboye.zhujia.custom.XListView;
/**
 * 开锁记录
 * @author 余   焱
 *
 */
public class ActivityUnlockingRecord extends BaseActivity {
	ImageView close_icon;//返回图片
	TextView add_shap_title_tv;//标题
	
	XListView xlistview;
	
	ItemUnlockingAdapter adapter;//适配器
	
	List<Map<String, Object>> list;
	@Override
	public int initView() {
		return 0;
	}

	@Override
	public void onMyCreate() {
		setContentView(R.layout.activity_unlocking_record);
		
		add_shap_title_tv.setText("开锁记录");
		
		adapter=new ItemUnlockingAdapter(ActivityUnlockingRecord.this, add());
		xlistview.setAdapter(adapter);

	}
	/**
	 * 静态数据源
	 * @return
	 */
	public List<Map<String, Object>> add(){
		list=new ArrayList<Map<String, Object>>();
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("img", R.drawable.ic_launcher);
		map.put("name", "Abby");
		map.put("state", "开锁成功");
		map.put("time", "2016.8.23 10:18");
		list.add(map);
		
		return list;
	}

}
